# /bin/bash

WEB_PATH='/home/centos/www/b2c-trade-new-dev'        #!服务器上git项目的路径

WEB_USER='root'
WEB_USERGROUP='root'
 
echo "Start deployment"
cd $WEB_PATH
pm2 stop b2c
echo "pulling source code..."
git reset --hard origin/master
git clean -f
git pull
git checkout master
echo "changing permissions..."
chown -R $WEB_USER:$WEB_USERGROUP $WEB_PATH
echo "Finished."

#cp -r /usr/local/nginx/html/nodeserver/inner-publish/.nuxt/dist/* /usr/local/nginx/html/_nuxt
pm2 restart b2c
#cd '/usr/local/nginx/html/_nuxt'

#systemctl restart nginx

